<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: PDO</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__CO__PDO.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">PDO<div class="ingroups"><a class="el" href="group__CO__CANopen__301.html">CANopen_301</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>CANopen Process Data Object protocol.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CO__PDO_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__PDO_8h.html">CO_PDO.h</a></td></tr>
<tr class="memdesc:CO__PDO_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Process Data Object protocol. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__RPDOCommPar__t.html">CO_RPDOCommPar_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">RPDO communication parameter.  <a href="structCO__RPDOCommPar__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__RPDOMapPar__t.html">CO_RPDOMapPar_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">RPDO mapping parameter.  <a href="structCO__RPDOMapPar__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__TPDOCommPar__t.html">CO_TPDOCommPar_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">TPDO communication parameter.  <a href="structCO__TPDOCommPar__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__TPDOMapPar__t.html">CO_TPDOMapPar_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">TPDO mapping parameter.  <a href="structCO__TPDOMapPar__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__RPDO__t.html">CO_RPDO_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">RPDO object.  <a href="structCO__RPDO__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__TPDO__t.html">CO_TPDO_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">TPDO object.  <a href="structCO__TPDO__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga92c484ada2ad240c1b8c891c88d56901"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__PDO.html#ga92c484ada2ad240c1b8c891c88d56901">CO_RPDO_init</a> (<a class="el" href="structCO__RPDO__t.html">CO_RPDO_t</a> *RPDO, <a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, <a class="el" href="structCO__SDO__t.html">CO_SDO_t</a> *SDO, <a class="el" href="structCO__SYNC__t.html">CO_SYNC_t</a> *SYNC, <a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> *operatingState, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> defaultCOB_ID, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> restrictionFlags, const <a class="el" href="structCO__RPDOCommPar__t.html">CO_RPDOCommPar_t</a> *RPDOCommPar, const <a class="el" href="structCO__RPDOMapPar__t.html">CO_RPDOMapPar_t</a> *RPDOMapPar, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> idx_RPDOCommPar, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> idx_RPDOMapPar, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANdevRx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevRxIdx)</td></tr>
<tr class="memdesc:ga92c484ada2ad240c1b8c891c88d56901"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize RPDO object.  <a href="#ga92c484ada2ad240c1b8c891c88d56901">More...</a><br /></td></tr>
<tr class="separator:ga92c484ada2ad240c1b8c891c88d56901"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34532746ccf88ccfa835716e89369478"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__PDO.html#ga34532746ccf88ccfa835716e89369478">CO_RPDO_initCallbackPre</a> (<a class="el" href="structCO__RPDO__t.html">CO_RPDO_t</a> *RPDO, void *object, void(*pFunctSignalPre)(void *object))</td></tr>
<tr class="memdesc:ga34532746ccf88ccfa835716e89369478"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize RPDO callback function.  <a href="#ga34532746ccf88ccfa835716e89369478">More...</a><br /></td></tr>
<tr class="separator:ga34532746ccf88ccfa835716e89369478"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8fb100744dc91f84b236c55ee37200a1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__PDO.html#ga8fb100744dc91f84b236c55ee37200a1">CO_TPDO_init</a> (<a class="el" href="structCO__TPDO__t.html">CO_TPDO_t</a> *TPDO, <a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, <a class="el" href="structCO__SDO__t.html">CO_SDO_t</a> *SDO, <a class="el" href="structCO__SYNC__t.html">CO_SYNC_t</a> *SYNC, <a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> *operatingState, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> defaultCOB_ID, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> restrictionFlags, const <a class="el" href="structCO__TPDOCommPar__t.html">CO_TPDOCommPar_t</a> *TPDOCommPar, const <a class="el" href="structCO__TPDOMapPar__t.html">CO_TPDOMapPar_t</a> *TPDOMapPar, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> idx_TPDOCommPar, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> idx_TPDOMapPar, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *CANdevTx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANdevTxIdx)</td></tr>
<tr class="memdesc:ga8fb100744dc91f84b236c55ee37200a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize TPDO object.  <a href="#ga8fb100744dc91f84b236c55ee37200a1">More...</a><br /></td></tr>
<tr class="separator:ga8fb100744dc91f84b236c55ee37200a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafec3eb12b93146a3706cbf03d3770a8d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__PDO.html#gafec3eb12b93146a3706cbf03d3770a8d">CO_TPDOisCOS</a> (<a class="el" href="structCO__TPDO__t.html">CO_TPDO_t</a> *TPDO)</td></tr>
<tr class="memdesc:gafec3eb12b93146a3706cbf03d3770a8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Verify Change of State of the PDO.  <a href="#gafec3eb12b93146a3706cbf03d3770a8d">More...</a><br /></td></tr>
<tr class="separator:gafec3eb12b93146a3706cbf03d3770a8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga322b7f209618709f5a9305685a8f96f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__dataTypes.html#ga932e6ccc3d54c58f761c1aead83bd6d7">int16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__PDO.html#ga322b7f209618709f5a9305685a8f96f5">CO_TPDOsend</a> (<a class="el" href="structCO__TPDO__t.html">CO_TPDO_t</a> *TPDO)</td></tr>
<tr class="memdesc:ga322b7f209618709f5a9305685a8f96f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send TPDO message.  <a href="#ga322b7f209618709f5a9305685a8f96f5">More...</a><br /></td></tr>
<tr class="separator:ga322b7f209618709f5a9305685a8f96f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad77bfd4c7f64e75e7ddee5c926477e66"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__PDO.html#gad77bfd4c7f64e75e7ddee5c926477e66">CO_RPDO_process</a> (<a class="el" href="structCO__RPDO__t.html">CO_RPDO_t</a> *RPDO, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> syncWas)</td></tr>
<tr class="memdesc:gad77bfd4c7f64e75e7ddee5c926477e66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process received PDO messages.  <a href="#gad77bfd4c7f64e75e7ddee5c926477e66">More...</a><br /></td></tr>
<tr class="separator:gad77bfd4c7f64e75e7ddee5c926477e66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0bb0d1b09d37ca19e01d47d8d0004f6b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__PDO.html#ga0bb0d1b09d37ca19e01d47d8d0004f6b">CO_TPDO_process</a> (<a class="el" href="structCO__TPDO__t.html">CO_TPDO_t</a> *TPDO, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> syncWas, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:ga0bb0d1b09d37ca19e01d47d8d0004f6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process transmitting PDO messages.  <a href="#ga0bb0d1b09d37ca19e01d47d8d0004f6b">More...</a><br /></td></tr>
<tr class="separator:ga0bb0d1b09d37ca19e01d47d8d0004f6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>CANopen Process Data Object protocol. </p>
<p>Process data objects are used for real-time data transfer with no protocol overhead.</p>
<p>TPDO with specific identifier is transmitted by one device and recieved by zero or more devices as RPDO. PDO communication parameters(COB-ID, transmission type, etc.) are in Object Dictionary at index 0x1400+ and 0x1800+. PDO mapping parameters (size and contents of the PDO) are in Object Dictionary at index 0x1600+ and 0x1A00+.</p>
<p>Features of the PDO as implemented here, in CANopenNode:</p><ul>
<li>Dynamic PDO mapping.</li>
<li>Map granularity of one byte.</li>
<li>After RPDO is received from CAN bus, its data are copied to buffer. Function <a class="el" href="group__CO__PDO.html#gad77bfd4c7f64e75e7ddee5c926477e66" title="Process received PDO messages. ">CO_RPDO_process()</a> (called by application) copies data to mapped objects in Object Dictionary. Synchronous RPDOs are processed AFTER reception of the next SYNC message.</li>
<li>Function <a class="el" href="group__CO__PDO.html#ga0bb0d1b09d37ca19e01d47d8d0004f6b" title="Process transmitting PDO messages. ">CO_TPDO_process()</a> (called by application) sends TPDO if necessary. There are possible different transmission types, including automatic detection of Change of State of specific variable. </li>
</ul>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga92c484ada2ad240c1b8c891c88d56901"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga92c484ada2ad240c1b8c891c88d56901">&#9670;&nbsp;</a></span>CO_RPDO_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_RPDO_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__RPDO__t.html">CO_RPDO_t</a> *&#160;</td>
          <td class="paramname"><em>RPDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__SDO__t.html">CO_SDO_t</a> *&#160;</td>
          <td class="paramname"><em>SDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__SYNC__t.html">CO_SYNC_t</a> *&#160;</td>
          <td class="paramname"><em>SYNC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> *&#160;</td>
          <td class="paramname"><em>operatingState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nodeId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>defaultCOB_ID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>restrictionFlags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structCO__RPDOCommPar__t.html">CO_RPDOCommPar_t</a> *&#160;</td>
          <td class="paramname"><em>RPDOCommPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structCO__RPDOMapPar__t.html">CO_RPDOMapPar_t</a> *&#160;</td>
          <td class="paramname"><em>RPDOMapPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>idx_RPDOCommPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>idx_RPDOMapPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANdevRx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevRxIdx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize RPDO object. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">RPDO</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">em</td><td>Emergency object. </td></tr>
    <tr><td class="paramname">SDO</td><td>SDO server object. </td></tr>
    <tr><td class="paramname">SYNC</td><td>void pointer to SYNC object or NULL. </td></tr>
    <tr><td class="paramname">operatingState</td><td>Pointer to variable indicating CANopen device NMT internal state. </td></tr>
    <tr><td class="paramname">nodeId</td><td>CANopen Node ID of this device. If default COB_ID is used, value will be added. </td></tr>
    <tr><td class="paramname">defaultCOB_ID</td><td>Default COB ID for this PDO (without NodeId). See <a class="el" href="group__CO__driver.html#ga01dd35ae53fd2209ceccabdc8bf8dd06" title="Default CANopen identifiers. ">CO_Default_CAN_ID_t</a> </td></tr>
    <tr><td class="paramname">restrictionFlags</td><td>Flag bits indicates, how PDO communication and mapping parameters are handled:<ul>
<li>Bit1: If true, communication parameters are writeable only in pre-operational NMT state.</li>
<li>Bit2: If true, mapping parameters are writeable only in pre-operational NMT state.</li>
<li>Bit3: If true, communication parameters are read-only.</li>
<li>Bit4: If true, mapping parameters are read-only. </li>
</ul>
</td></tr>
    <tr><td class="paramname">RPDOCommPar</td><td>Pointer to <em>RPDO communication parameter</em> record from Object dictionary (index 0x1400+). </td></tr>
    <tr><td class="paramname">RPDOMapPar</td><td>Pointer to <em>RPDO mapping parameter</em> record from Object dictionary (index 0x1600+). </td></tr>
    <tr><td class="paramname">idx_RPDOCommPar</td><td>Index in Object Dictionary. </td></tr>
    <tr><td class="paramname">idx_RPDOMapPar</td><td>Index in Object Dictionary. </td></tr>
    <tr><td class="paramname">CANdevRx</td><td>CAN device for PDO reception. </td></tr>
    <tr><td class="paramname">CANdevRxIdx</td><td>Index of receive buffer in the above CAN device.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions. ">CO_ReturnError_t</a>: CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT. </dd></dl>

</div>
</div>
<a id="ga34532746ccf88ccfa835716e89369478"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga34532746ccf88ccfa835716e89369478">&#9670;&nbsp;</a></span>CO_RPDO_initCallbackPre()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_RPDO_initCallbackPre </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__RPDO__t.html">CO_RPDO_t</a> *&#160;</td>
          <td class="paramname"><em>RPDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignalPre</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize RPDO callback function. </p>
<p>Function initializes optional callback function, which should immediately start processing of <a class="el" href="group__CO__PDO.html#gad77bfd4c7f64e75e7ddee5c926477e66" title="Process received PDO messages. ">CO_RPDO_process()</a> function. Callback is called after RPDO message is received from the CAN bus.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">RPDO</td><td>This object. </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignalPre(). Can be NULL </td></tr>
    <tr><td class="paramname">pFunctSignalPre</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gad77bfd4c7f64e75e7ddee5c926477e66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad77bfd4c7f64e75e7ddee5c926477e66">&#9670;&nbsp;</a></span>CO_RPDO_process()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_RPDO_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__RPDO__t.html">CO_RPDO_t</a> *&#160;</td>
          <td class="paramname"><em>RPDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>syncWas</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process received PDO messages. </p>
<p>Function must be called cyclically in any NMT state. It copies data from RPDO to Object Dictionary variables if: new PDO receives and PDO is valid and NMT operating state is operational. It does not verify <em>transmission type</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">RPDO</td><td>This object. </td></tr>
    <tr><td class="paramname">syncWas</td><td>True, if CANopen SYNC message was just received or transmitted. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8fb100744dc91f84b236c55ee37200a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8fb100744dc91f84b236c55ee37200a1">&#9670;&nbsp;</a></span>CO_TPDO_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_TPDO_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__TPDO__t.html">CO_TPDO_t</a> *&#160;</td>
          <td class="paramname"><em>TPDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__SDO__t.html">CO_SDO_t</a> *&#160;</td>
          <td class="paramname"><em>SDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__SYNC__t.html">CO_SYNC_t</a> *&#160;</td>
          <td class="paramname"><em>SYNC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> *&#160;</td>
          <td class="paramname"><em>operatingState</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nodeId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>defaultCOB_ID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>restrictionFlags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structCO__TPDOCommPar__t.html">CO_TPDOCommPar_t</a> *&#160;</td>
          <td class="paramname"><em>TPDOCommPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structCO__TPDOMapPar__t.html">CO_TPDOMapPar_t</a> *&#160;</td>
          <td class="paramname"><em>TPDOMapPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>idx_TPDOCommPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>idx_TPDOMapPar</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>CANdevTx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANdevTxIdx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize TPDO object. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">TPDO</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">em</td><td>Emergency object. </td></tr>
    <tr><td class="paramname">SDO</td><td>SDO object. </td></tr>
    <tr><td class="paramname">SYNC</td><td>void pointer to SYNC object or NULL. </td></tr>
    <tr><td class="paramname">operatingState</td><td>Pointer to variable indicating CANopen device NMT internal state. </td></tr>
    <tr><td class="paramname">nodeId</td><td>CANopen Node ID of this device. If default COB_ID is used, value will be added. </td></tr>
    <tr><td class="paramname">defaultCOB_ID</td><td>Default COB ID for this PDO (without NodeId). See <a class="el" href="group__CO__driver.html#ga01dd35ae53fd2209ceccabdc8bf8dd06" title="Default CANopen identifiers. ">CO_Default_CAN_ID_t</a> </td></tr>
    <tr><td class="paramname">restrictionFlags</td><td>Flag bits indicates, how PDO communication and mapping parameters are handled:<ul>
<li>Bit1: If true, communication parameters are writeable only in pre-operational NMT state.</li>
<li>Bit2: If true, mapping parameters are writeable only in pre-operational NMT state.</li>
<li>Bit3: If true, communication parameters are read-only.</li>
<li>Bit4: If true, mapping parameters are read-only. </li>
</ul>
</td></tr>
    <tr><td class="paramname">TPDOCommPar</td><td>Pointer to <em>TPDO communication parameter</em> record from Object dictionary (index 0x1400+). </td></tr>
    <tr><td class="paramname">TPDOMapPar</td><td>Pointer to <em>TPDO mapping parameter</em> record from Object dictionary (index 0x1600+). </td></tr>
    <tr><td class="paramname">idx_TPDOCommPar</td><td>Index in Object Dictionary. </td></tr>
    <tr><td class="paramname">idx_TPDOMapPar</td><td>Index in Object Dictionary. </td></tr>
    <tr><td class="paramname">CANdevTx</td><td>CAN device used for PDO transmission. </td></tr>
    <tr><td class="paramname">CANdevTxIdx</td><td>Index of transmit buffer in the above CAN device.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions. ">CO_ReturnError_t</a>: CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT. </dd></dl>

</div>
</div>
<a id="ga0bb0d1b09d37ca19e01d47d8d0004f6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0bb0d1b09d37ca19e01d47d8d0004f6b">&#9670;&nbsp;</a></span>CO_TPDO_process()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_TPDO_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__TPDO__t.html">CO_TPDO_t</a> *&#160;</td>
          <td class="paramname"><em>TPDO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>syncWas</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process transmitting PDO messages. </p>
<p>Function must be called cyclically in any NMT state. It prepares and sends TPDO if necessary. If Change of State needs to be detected, function <a class="el" href="group__CO__PDO.html#gafec3eb12b93146a3706cbf03d3770a8d" title="Verify Change of State of the PDO. ">CO_TPDOisCOS()</a> must be called before.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">TPDO</td><td>This object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">syncWas</td><td>True, if CANopen SYNC message was just received or transmitted. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in [microseconds]. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS - see CO_process_SYNC_PDO(). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gafec3eb12b93146a3706cbf03d3770a8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafec3eb12b93146a3706cbf03d3770a8d">&#9670;&nbsp;</a></span>CO_TPDOisCOS()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> CO_TPDOisCOS </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__TPDO__t.html">CO_TPDO_t</a> *&#160;</td>
          <td class="paramname"><em>TPDO</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Verify Change of State of the PDO. </p>
<p>Function verifies if variable mapped to TPDO has changed its value. Verified are only variables, which has set attribute <em>CO_ODA_TPDO_DETECT_COS</em> in <a class="el" href="group__CO__SDOserver.html#ga0244f2d504e0de4f14614884d7319fd0" title="Object Dictionary attributes. ">CO_SDO_OD_attributes_t</a>.</p>
<p>Function may be called by application just before <a class="el" href="group__CO__PDO.html#ga0bb0d1b09d37ca19e01d47d8d0004f6b" title="Process transmitting PDO messages. ">CO_TPDO_process()</a> function, for example: <code>TPDOx-&gt;sendRequest = CO_TPDOisCOS(TPDOx); CO_TPDO_process(TPDOx, ....</code></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">TPDO</td><td>TPDO object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if COS was detected. </dd></dl>

</div>
</div>
<a id="ga322b7f209618709f5a9305685a8f96f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga322b7f209618709f5a9305685a8f96f5">&#9670;&nbsp;</a></span>CO_TPDOsend()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__dataTypes.html#ga932e6ccc3d54c58f761c1aead83bd6d7">int16_t</a> CO_TPDOsend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__TPDO__t.html">CO_TPDO_t</a> *&#160;</td>
          <td class="paramname"><em>TPDO</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send TPDO message. </p>
<p>Function prepares TPDO data from Object Dictionary variables. It should not be called by application, it is called from <a class="el" href="group__CO__PDO.html#ga0bb0d1b09d37ca19e01d47d8d0004f6b" title="Process transmitting PDO messages. ">CO_TPDO_process()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">TPDO</td><td>TPDO object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Same as <a class="el" href="group__CO__driver.html#ga4664a9f5d547cb0605a9e929fb079f2e" title="Send CAN message. ">CO_CANsend()</a>. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Tue Jun 9 2020 17:29:32 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
